package Structural_design_pattern.Composite_Pattern.Example3;

public class Client {
    public static void main(String[] args) {
        Folder folder1 = new Folder("文件夹1");
        folder1.add(new ImageFile("图片1"));
        folder1.add(new TextFile("文本1"));

        Folder folder2 = new Folder("文件夹2");
        folder2.add(new VideoFile("视频1"));
        folder2.add(folder1);

        folder2.display();
    }
}
